ERROR = require '../_error.coffee'
module.exports = (err, password)->
    switch err.password
        when ERROR.PASSWORD.LENGTH
            len = password.length
            if len < 8
                err.password = "密码长度不少于八个字符"
            else if len > 64
                err.password = "密码长度不超过六十四个字符"
    return err
